#!/bin/bash
passwd
locale-gen
apt-get update
apt-get upgrade
apt-get install vim nano screen htop git mongodb curl build-essential openssl libssl-dev
git clone http://code.google.com/p/rapid-debian-server-preparation/ ./
git clone https://github.com/joyent/node.git
cd node
 
# 'git tag' shows all available versions: select the latest stable.
git checkout v0.6.8
 
# Configure seems not to find libssl by default so we give it an explicit pointer.
# Optionally: you can isolate node by adding --prefix=/opt/node
./configure --openssl-libpath=/usr/lib/ssl
make
make test
sudo make install
node -v # it's alive!
 
# Luck us: NPM is packaged with Node.js source so this is now installed too
# curl http://npmjs.org/install.sh | sudo sh
npm -v # it's alive!
